 {
        var o = function () {
        };
        o.prototype = {
            _gameId: 0,
            _userId: 0,
            _userName: "",
            _userPic: "",
            _loc: "",
            _userProfile: {},
            _sex: 0,
            _gameData: {},
            _gameList: [],
            wxgame_session_key: 0,
            PROFILE_PREFIX: "szscmj_profile_",
            profile: {
                ALLOW_SOUND_MUSIC: !0,
                ALLOW_SOUND_EFFECT: !0,
                ALLOW_MOBILE_SHAKE: !1,
                ALLOW_LOCAL_AUDIO: !0,
                ALLOW_SINGLE_LAUNCH: !0,
                ALLOW_MAX_LAUNCH: !1,
                GAME_TYPE_PROVINCE: null,
                BACKTO_GAME_TYPE: null,
                IS_BACK_ROOM: !1,
                GET_CLICK_TAB: 1,
                ONBACK_PLAY_MAP: !1,
                CLICK_DOUBLE: !0
            },
            authorCode: "",
            hadDiamondNum: 0,
            hadYuanBaoNum: 0,
            firstGameRewardData: [],
            updateUserInfo: function (e) {
                e.loc && (this._loc = e.loc), e.gameId && (this._gameId = e.gameId), e.udata && (this._userProfile = e.udata,
                void 0 != e.udata.sex && this.setUserSex(e.udata.sex)), e.userId && this.setUserId(e.userId),
                e.name && this.setUserName(e.name), console.log("==============user_info 返回成功 =============="),
                    Global.notificationCenter.emit(Global.eventName.UPDATE_USERINFO_SUCCESSED), Global.notificationCenter.emit(Global.eventName.MSG_REFRESH_HEAD_INFO),
                cc.sys.platform !== cc.sys.WECHAT_GAME && this.loadProfile();
            },
            sdkLogInSuccess: function (e) {
                console.log("sdkLogInSuccess data:", e), this.setUserId(e.userId), this.setUserName(e.userName),
                    this.setUserPic(e.purl), this._gameId = e.appId, this.authorCode = e.authorCode,
                    this.wxgame_session_key = e.wxgame_session_key, this.loadProfile();
            },
            updateLoc: function (e) {
                e && (e.locs && e.locs.length > 0 ? this._loc = e.locs[0] : this._loc = "0.0.0.0"),
                    Global.notificationCenter.emit(Global.eventName.UPDATE_LOC_SUCCESSED);
            },
            udpateNotify: function (e) {
                this._gameId = e.gameId || 0, this.setUserId(e.userId);
                var t = e.changes;
                if (console.log("udpateNotify changes:", t), t && t.length > 0) {
                    var n = Global.msgHandler;
                    for (var o in t) "redpoint5" == t[o] || ("udata" == t[o] ? n.requestGetUserInfo() : "gdata" == t[o] && n.requestGetUserInfo());
                }
            },
            udpateGameData: function (e) {
                for (var t in this._gameId = e.gameId || 0, this.setUserId(e.userId), this._gameData = e.gdata || null,
                    this._gameData) this._userProfile[t] = this._gameData[t];
            },
            udpateGameList: function (e) {
                this._gameId = e.gameId || 0, this.setUserId(e.userId), this._gameList = e.games || [];
            },
            getUserProfile: function () {
                return this._userProfile;
            },
            setUserSex: function (e) {
                this._sex = e || 0;
            },
            getUserSex: function () {
                return this._sex;
            },
            setUserId: function (e) {
                e && (this._userId = e);
            },
            getUserId: function () {
                return this._userId || 0;
            },
            setUserName: function (e) {
                e && "" != e && (this._userName = e);
            },
            getUserName: function () {
                return this._userName || "";
            },
            setUserPic: function (e) {
                e && "" != e && (this._userPic = e);
            },
            getUserPic: function () {
                return this._userPic || "";
            },
            getGameId: function () {
                return this._gameId;
            },
            getLocalKey: function () {
                return this.PROFILE_PREFIX + this.getUserId();
            },
            getWXGameSessionKey: function () {
                return this.wxgame_session_key || 0;
            },
            isInGame: function () {
                var e = "0.0.0.0" !== this._loc;
                return "[object Array]" === Object.prototype.toString.call(this._loc) && 0 === this._loc.length && (e = !1),
                    e;
            },
            getLoc: function () {
                return this._loc;
            },
            setHadDiamondNum: function (e) {
                this.hadDiamondNum = e || 0;
            },
            getHadDiamondNum: function () {
                return this.hadDiamondNum;
            },
            setHadYuanBaoNum: function (e) {
                this.hadYuanBaoNum = e || 0;
            },
            getHadYuanBaoNum: function () {
                return this.hadYuanBaoNum;
            },
            setAcceptFirstGameReward: function (e) {
                this.acceptFirstGameReward = e || !1;
            },
            getAcceptFirstGameReward: function () {
                return this.acceptFirstGameReward;
            },
            setAcceptDailyFreeGive: function (e) {
                this.canRecieveFreeGive = e;
            },
            getCanDailyFreeGive: function () {
                return this.canRecieveFreeGive;
            },
            loadProfile: function () {
                var e = cc.sys.localStorage.getItem(this.getLocalKey());
                e && (this.profile = JSON.parse(e));
            },
            setProfile: function (e, t) {
                this.profile[e] = t, cc.sys.localStorage.setItem(this.getLocalKey(), JSON.stringify(this.profile));
            },
            setMyHeadSpf: function (e) {
                console.log("getMySpf sp:", e, this.getUserPic(), this._userProfile && this._userProfile.purl);
                var t = this.getUserPic() || this._userProfile && this._userProfile.purl;
                t += "?aa=aa.jpg", console.log("purl = ", t), cc.loader.load(t, function (t, n) {
                    if (null == t) {
                        var o = new cc.SpriteFrame(n);
                        e && cc.isValid(e) && (e.spriteFrame = o);
                    }
                });
            }
        },  module.exports = o
    }